var amapFile=require('amap-wx.js');
var config=require('config.js');

page({
  data:{
    markers:[],
    latitude:'',
    longitude:'',
    textData:{}
  },
  onLoad:function(){
    var that=this;
    var key=config.Config.key;
    var myAmapFun = new amapFile.AMapWX({key:key});

    myAmapFun.getRegeo({
      success:function(data){
        //成功回调
        that.setData({
          textData:{
            desc:data[0].desc
          }
        })
      },
      fail:function(data){
        console.log(info)
      }
    })
  },
})
